<template>
  <div class="app-container">
    <!-- 添加或修改数据报告对话框 -->
    <jy-dialog :title="title" :visible.sync="open" width="100%" append-to-body>
      <el-row :gutter="20">
        <el-col :span="3">
          <el-menu
            :default-active="activeName"
            @select="handleSelect"
            class="el-menu-vertical-demo"
            @open="handleOpen"
            @close="handleClose"
            background-color="#545c64"
            text-color="#fff"
            active-text-color="#ffd04b"
          >
            <el-menu-item v-for="(item, index) in menuNameList" :key="item.key" :index="item.key">
              <i class="el-icon-menu"></i>
              <span slot="title">{{ item.name }}</span>
            </el-menu-item>
          </el-menu>
        </el-col>
        <el-col :span="21">
          <el-table border v-if="activeName == 'zrdsj'" :data="cementDataList" size="mini" ref="multipleTable" tooltip-effect="dark" @selection-change="handleSelectionChange">
            <el-table-column type="selection" width="55" />
            <el-table-column label="试验名称" align="center" prop="symc" show-overflow-tooltip />
            <el-table-column label="试验编号" align="center" prop="sybh" show-overflow-tooltip />
            <el-table-column label="设备名称" align="center" prop="deviceName" show-overflow-tooltip />
            <el-table-column label="设备型号" align="center" prop="deviceModel" show-overflow-tooltip />
            <el-table-column label="试样数量" align="center" prop="sysl" />
            <el-table-column label="龄期" align="center" prop="lq" />
            <el-table-column label="强度等级" align="center">
              <template slot-scope="scope"
                ><span>{{ scope.row.qddj || "-" }}</span></template
              >
            </el-table-column>
            <el-table-column label="有效强度" align="center" prop="yxqd" width="75" show-overflow-tooltip />
            <el-table-column label="评定结果" align="center" width="75" show-overflow-tooltip>
              <template slot-scope="scope"
                ><span>{{ scope.row.pdjg || "-" }}</span></template
              >
            </el-table-column>
            <el-table-column label="试验时间" align="center" prop="sysj" width="135" />
            <el-table-column label="截面形状" align="center" prop="shape" width="75" />
            <el-table-column label="尺寸" align="center" prop="size" width="100" />
            <el-table-column label="系数" align="center" prop="xs" width="60" />
            <el-table-column label="品种" align="center" width="75" show-overflow-tooltip>
              <template slot-scope="scope"
                ><span>{{ scope.row.pinZhong || "-" }}</span></template
              >
            </el-table-column>
            <el-table-column label="设备编号" align="center" width="90" prop="deviceCode" show-overflow-tooltip />
            <el-table-column label="试验员" align="center" width="75" show-overflow-tooltip>
              <template slot-scope="scope"
                ><span>{{ scope.row.tester || "-" }}</span></template
              >
            </el-table-column>
          </el-table>
          <el-table border v-else-if="activeName == 'rhdsj'" :data="cementDataList" size="mini" ref="multipleTable" tooltip-effect="dark" @selection-change="handleSelectionChange">
            <el-table-column type="selection" width="55" />
            <el-table-column label="试验名称" align="center" prop="symc" show-overflow-tooltip />
            <el-table-column label="试验编号" align="center" prop="sybh" show-overflow-tooltip />
            <el-table-column label="设备名称" align="center" prop="deviceName" show-overflow-tooltip />
            <el-table-column label="设备型号" align="center" prop="deviceModel" show-overflow-tooltip />
            <el-table-column label="试样数量" align="center" prop="sysl" />
            <el-table-column label="龄期" align="center" prop="lq" />
            <el-table-column label="强度等级" align="center">
              <template slot-scope="scope"
                ><span>{{ scope.row.qddj || "-" }}</span></template
              >
            </el-table-column>
            <el-table-column label="有效强度" align="center" prop="yxqd" width="75" show-overflow-tooltip />
            <el-table-column label="评定结果" align="center" width="75" show-overflow-tooltip>
              <template slot-scope="scope"
                ><span>{{ scope.row.pdjg || "-" }}</span></template
              >
            </el-table-column>
            <el-table-column label="试验时间" align="center" prop="sysj" width="135" />
            <el-table-column label="截面形状" align="center" prop="shape" width="75" />
            <el-table-column label="尺寸" align="center" prop="size" width="100" />
            <el-table-column label="系数" align="center" prop="xs" width="60" />
            <el-table-column label="品种" align="center" width="75" show-overflow-tooltip>
              <template slot-scope="scope"
                ><span>{{ scope.row.pinZhong || "-" }}</span></template
              >
            </el-table-column>
            <el-table-column label="设备编号" align="center" width="90" prop="deviceCode" show-overflow-tooltip />
            <el-table-column label="试验员" align="center" width="75" show-overflow-tooltip>
              <template slot-scope="scope"
                ><span>{{ scope.row.tester || "-" }}</span></template
              >
            </el-table-column>
          </el-table>
          <el-table border v-else-if="activeName == 'yljsj'" :data="cementDataList" size="mini" ref="multipleTable" tooltip-effect="dark" @selection-change="handleSelectionChange">
            <el-table-column type="selection" width="55" />
            <el-table-column label="试验名称" align="center" prop="symc" show-overflow-tooltip />
            <el-table-column label="试验编号" align="center" prop="sybh" show-overflow-tooltip />
            <el-table-column label="设备名称" align="center" prop="deviceName" show-overflow-tooltip />
            <el-table-column label="设备型号" align="center" prop="deviceModel" show-overflow-tooltip />
            <el-table-column label="试样数量" align="center" prop="sysl" />
            <el-table-column label="龄期" align="center" prop="lq" />
            <el-table-column label="强度等级" align="center">
              <template slot-scope="scope"
                ><span>{{ scope.row.qddj || "-" }}</span></template
              >
            </el-table-column>
            <el-table-column label="有效强度" align="center" prop="yxqd" width="75" show-overflow-tooltip />
            <el-table-column label="评定结果" align="center" width="75" show-overflow-tooltip>
              <template slot-scope="scope"
                ><span>{{ scope.row.pdjg || "-" }}</span></template
              >
            </el-table-column>
            <el-table-column label="试验时间" align="center" prop="sysj" width="135" />
            <el-table-column label="截面形状" align="center" prop="shape" width="75" />
            <el-table-column label="尺寸" align="center" prop="size" width="100" />
            <el-table-column label="系数" align="center" prop="xs" width="60" />
            <el-table-column label="品种" align="center" width="75" show-overflow-tooltip>
              <template slot-scope="scope"
                ><span>{{ scope.row.pinZhong || "-" }}</span></template
              >
            </el-table-column>
            <el-table-column label="设备编号" align="center" width="90" prop="deviceCode" show-overflow-tooltip />
            <el-table-column label="试验员" align="center" width="75" show-overflow-tooltip>
              <template slot-scope="scope"
                ><span>{{ scope.row.tester || "-" }}</span></template
              >
            </el-table-column>
          </el-table>
          <el-table border v-else-if="activeName == 'ydsj'" :data="cementDataList" size="mini" ref="multipleTable" tooltip-effect="dark" @selection-change="handleSelectionChange">
            <el-table-column type="selection" width="55" />
            <el-table-column label="试验名称" align="center" prop="symc" show-overflow-tooltip />
            <el-table-column label="试验编号" align="center" prop="sybh" show-overflow-tooltip />
            <el-table-column label="设备名称" align="center" prop="deviceName" show-overflow-tooltip />
            <el-table-column label="设备型号" align="center" prop="deviceModel" show-overflow-tooltip />
            <el-table-column label="试样数量" align="center" prop="sysl" />
            <el-table-column label="龄期" align="center" prop="lq" />
            <el-table-column label="强度等级" align="center">
              <template slot-scope="scope"
                ><span>{{ scope.row.qddj || "-" }}</span></template
              >
            </el-table-column>
            <el-table-column label="有效强度" align="center" prop="yxqd" width="75" show-overflow-tooltip />
            <el-table-column label="评定结果" align="center" width="75" show-overflow-tooltip>
              <template slot-scope="scope"
                ><span>{{ scope.row.pdjg || "-" }}</span></template
              >
            </el-table-column>
            <el-table-column label="试验时间" align="center" prop="sysj" width="135" />
            <el-table-column label="截面形状" align="center" prop="shape" width="75" />
            <el-table-column label="尺寸" align="center" prop="size" width="100" />
            <el-table-column label="系数" align="center" prop="xs" width="60" />
            <el-table-column label="品种" align="center" width="75" show-overflow-tooltip>
              <template slot-scope="scope"
                ><span>{{ scope.row.pinZhong || "-" }}</span></template
              >
            </el-table-column>
            <el-table-column label="设备编号" align="center" width="90" prop="deviceCode" show-overflow-tooltip />
            <el-table-column label="试验员" align="center" width="75" show-overflow-tooltip>
              <template slot-scope="scope"
                ><span>{{ scope.row.tester || "-" }}</span></template
              >
            </el-table-column>
          </el-table>
          <el-table border v-else-if="activeName == 'mxesj'" :data="cementDataList" size="mini" ref="multipleTable" tooltip-effect="dark" @selection-change="handleSelectionChange">
            <el-table-column type="selection" width="55" />
            <el-table-column label="试验名称" align="center" prop="symc" show-overflow-tooltip />
            <el-table-column label="试验编号" align="center" prop="sybh" show-overflow-tooltip />
            <el-table-column label="设备名称" align="center" prop="deviceName" show-overflow-tooltip />
            <el-table-column label="设备型号" align="center" prop="deviceModel" show-overflow-tooltip />
            <el-table-column label="试样数量" align="center" prop="sysl" />
            <el-table-column label="龄期" align="center" prop="lq" />
            <el-table-column label="强度等级" align="center">
              <template slot-scope="scope"
                ><span>{{ scope.row.qddj || "-" }}</span></template
              >
            </el-table-column>
            <el-table-column label="有效强度" align="center" prop="yxqd" width="75" show-overflow-tooltip />
            <el-table-column label="评定结果" align="center" width="75" show-overflow-tooltip>
              <template slot-scope="scope"
                ><span>{{ scope.row.pdjg || "-" }}</span></template
              >
            </el-table-column>
            <el-table-column label="试验时间" align="center" prop="sysj" width="135" />
            <el-table-column label="截面形状" align="center" prop="shape" width="75" />
            <el-table-column label="尺寸" align="center" prop="size" width="100" />
            <el-table-column label="系数" align="center" prop="xs" width="60" />
            <el-table-column label="品种" align="center" width="75" show-overflow-tooltip>
              <template slot-scope="scope"
                ><span>{{ scope.row.pinZhong || "-" }}</span></template
              >
            </el-table-column>
            <el-table-column label="设备编号" align="center" width="90" prop="deviceCode" show-overflow-tooltip />
            <el-table-column label="试验员" align="center" width="75" show-overflow-tooltip>
              <template slot-scope="scope"
                ><span>{{ scope.row.tester || "-" }}</span></template
              >
            </el-table-column>
          </el-table>
          <el-table border v-else-if="activeName == 'rslsj'" :data="cementDataList2" size="mini" ref="multipleTable" tooltip-effect="dark" @selection-change="handleSelectionChange">
            <el-table-column type="selection" width="55" />
            <el-table-column label="试验名称" align="center" prop="symc" show-overflow-tooltip />
            <el-table-column label="试验编号" align="center" prop="sybh" show-overflow-tooltip />
            <el-table-column label="设备名称" align="center" prop="deviceName" show-overflow-tooltip />
            <el-table-column label="设备型号" align="center" prop="deviceModel" show-overflow-tooltip />
            <el-table-column label="试样数量" align="center" prop="sysl" />
            <el-table-column label="龄期" align="center" prop="lq" />
            <el-table-column label="强度等级" align="center">
              <template slot-scope="scope"
                ><span>{{ scope.row.qddj || "-" }}</span></template
              >
            </el-table-column>
            <el-table-column label="有效强度" align="center" prop="yxqd" width="75" show-overflow-tooltip />
            <el-table-column label="评定结果" align="center" width="75" show-overflow-tooltip>
              <template slot-scope="scope"
                ><span>{{ scope.row.pdjg || "-" }}</span></template
              >
            </el-table-column>
            <el-table-column label="试验时间" align="center" prop="sysj" width="135" />
            <el-table-column label="截面形状" align="center" prop="shape" width="75" />
            <el-table-column label="尺寸" align="center" prop="size" width="100" />
            <el-table-column label="系数" align="center" prop="xs" width="60" />
            <el-table-column label="品种" align="center" width="75" show-overflow-tooltip>
              <template slot-scope="scope"
                ><span>{{ scope.row.pinZhong || "-" }}</span></template
              >
            </el-table-column>
            <el-table-column label="设备编号" align="center" width="90" prop="deviceCode" show-overflow-tooltip />
            <el-table-column label="试验员" align="center" width="75" show-overflow-tooltip>
              <template slot-scope="scope"
                ><span>{{ scope.row.tester || "-" }}</span></template
              >
            </el-table-column>
          </el-table>
          <!-- <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> -->
        </el-col>
      </el-row>

      <div slot="footer" class="dialog-footer">
        <el-button size="small" type="primary" @click="submitForm">确 定</el-button>
        <el-button size="small" @click="cancel">取 消</el-button>
      </div>
    </jy-dialog>
  </div>
</template>
  
  <script>
import { listBsDataReport, getBsDataReport, delBsDataReport, addBsDataReport, updateBsDataReport, goToTb } from "@/api/syrw/bsDataReport";
import { mapGetters } from "vuex";
import { syTpyeTree } from "@/api/base/syType";
import { listBiExcelType } from "@/api/syrw/biExcelType";
import { getRuleRes } from "@/api/sycs/bsRule";
import { groupBy, orderBy, map } from "lodash";
export default {
  name: "introduceIoTdataView",
  dicts: ["yp_status"],
  data() {
    return {
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      activeName: "yljsj",
      menuNameList: [
        {
          name: "针入度数据",
          val: "1",
          key: "zrdsj"
        },
        {
          name: "软化点数据",
          val: "2",
          key: "rhdsj"
        },
        {
          name: "压力机数据",
          val: "3",
          key: "yljsj"
        },
        {
          name: "延度数据",
          val: "4",
          key: "ydsj"
        },
        {
          name: "马歇尔数据",
          val: "5",
          key: "mxesj"
        },
        {
          name: "燃烧炉数据",
          val: "6",
          key: "rslsj"
        }
      ],
      cementDataList: [
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        }
      ],
      cementDataList2: [
        {
          symc: "抗压强度111",
          sybh: "YP-SG12-TYH-241115-002111",
          deviceName: "压力试验机111",
          deviceModel: "DYE-2000KN11",
          sysl: "311",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度",
          sybh: "YP-SG12-TYH-241115-002",
          deviceName: "压力试验机",
          deviceModel: "DYE-2000KN",
          sysl: "3",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        },
        {
          symc: "抗压强度111",
          sybh: "YP-SG12-TYH-241115-002111",
          deviceName: "压力试验机111",
          deviceModel: "DYE-2000KN11",
          sysl: "311",
          lq: "28",
          qddj: "C40",
          yxqd: "37.4",
          pdjg: "合格",
          sysj: "2024-11-14 20:40:23",
          shape: "4",
          size: "150*150*150",
          xs: "1",
          pinZhong: "",
          deviceCode: "JD02D001",
          tester: ""
        }
      ],
      multipleSelection: [],
    };
  },
  // 监听顶部全局下拉
  computed: {
    ...mapGetters(["deptId", "deptName"])
  },
  watch: {
    deptId(newValue, oldValue) {
      this.queryParams.deptId = newValue;
      this.getList();
    },
    deptName(newValue, oldValue) {
      console.log("new -name --" + newValue);
    }
  },
  created() {
    this.queryParams.deptId = this.$store.state.dept.deptId;
    this.form.deptId = this.queryParams.deptId;
    // this.getList();
  },

  methods: {
    init() {
      this.multipleSelection = [];
      this.title = "物联数据引入";
      this.open = true;
    },
    handleChange() {
      // this.getExcelTypeList();
      this.form.excelTypeList = [
        {
          excelTypeId: undefined,
          excelTypeName: undefined
        }
      ];
    },

    /** 查询数据报告列表 */
    getList() {
      listBsDataReport(this.queryParams).then((response) => {
        this.bsDataReportList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    cancel() {
      this.open = false;
    },
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
    submitForm() {
      // const keyName = this.menuNameList.find((item) => item.name === this.activeName);
      this.multipleSelection.forEach((v) => {
        v.keyName = this.activeName;
      });
      this.$emit("tableSelection", this.multipleSelection);
      this.open = false;
    },
    handleSelectionChange(val) {
      this.multipleSelection = val;
    },
    handleSelect(val) {
      this.activeName = val;
    }
  }
};
</script>
  
  <style lang="scss" scoped>
@import "~@/assets/styles/demo.scss";

.table-add {
  text-align: center;
  line-height: 23px;
  padding: 4px;
  border: 1px solid #dfe6ec;
  border-top: 0px solid #dfe6ec;
}
</style>
  